3.16 \(\int \frac{A+B x}{\left (a+b x+c x^2\right )^2 \left (d+e x+f x^2\right )} \, dx\)

Optimal. Leaf size=1075 \[ \text{result too large to display} \]

[Out]

-((A*c*(2*a*c*e - b*(c*d + a*f)) + (A*b - a*B)*(2*c^2*d + b^2*f - c*(b*e + 2*a*f
)) + c*(A*b^2*f + 2*c*(A*c*d + a*B*e - a*A*f) - b*(B*c*d + A*c*e + a*B*f))*x)/((
b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(a + b*x + c*x^2))) - ((b
^5*(B*d - A*e)*f^2 - 2*b^4*f*(B*c*d*e - A*(c*e^2 - c*d*f + a*f^2)) - 4*c^2*(A*(c
^3*d^3 - 3*a^3*f^3 - a^2*c*f*(e^2 - 7*d*f) + a*c^2*d*(3*e^2 - 5*d*f)) - a*B*e*(c
^2*d^2 - 3*a^2*f^2 - a*c*(e^2 - 2*d*f))) - 4*b^2*c*(B*c^2*d^2*e + A*f*(2*c^2*d^2
 + 3*a^2*f^2 + 3*a*c*(e^2 - d*f))) + 2*b*c*(B*(c^3*d^3 + 3*a^3*f^3 + a*c^2*d*(e^
2 - 7*d*f) + 3*a^2*c*f*(e^2 + d*f)) + A*c*e*(3*c^2*d^2 + 3*a^2*f^2 + a*c*(3*e^2
+ 2*d*f))) - b^3*(A*c*e*(c*e^2 - 2*c*d*f - 4*a*f^2) + B*(4*a*c*d*f^2 + a^2*f^3 -
 c^2*d*(e^2 + 5*d*f))))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/((b^2 - 4*a*c)^(
3/2)*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2) + ((
B*(c^2*d*e*(e^2 - 3*d*f) - 2*c*d*f*(b*e^2 - 2*b*d*f - a*e*f) + f^2*(b^2*d*e - 4*
a*b*d*f + a^2*e*f)) - A*(c^2*(e^4 - 4*d*e^2*f + 2*d^2*f^2) - f^2*(2*a*b*e*f - 2*
a^2*f^2 - b^2*(e^2 - 2*d*f)) + 2*c*f*(a*f*(e^2 - 2*d*f) - b*(e^3 - 3*d*e*f))))*A
rcTanh[(e + 2*f*x)/Sqrt[e^2 - 4*d*f]])/(Sqrt[e^2 - 4*d*f]*(c^2*d^2 + f*(b^2*d -
a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2) + ((A*(c*e - b*f)*(f*(b*e - 2*a
*f) - c*(e^2 - 2*d*f)) - B*(2*c*d*f*(b*e - a*f) - f^2*(b^2*d - a^2*f) - c^2*d*(e
^2 - d*f)))*Log[a + b*x + c*x^2])/(2*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b
*d*e - a*(e^2 - 2*d*f)))^2) - ((A*(c*e - b*f)*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)
) - B*(2*c*d*f*(b*e - a*f) - f^2*(b^2*d - a^2*f) - c^2*d*(e^2 - d*f)))*Log[d + e
*x + f*x^2])/(2*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f
)))^2)

_______________________________________________________________________________________

Rubi [A]  time = 11.0869, antiderivative size = 1067, normalized size of antiderivative = 0.99, number of steps used = 10, number of rules used = 6, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ -\frac{A c (2 a c e-b (c d+a f))+(A b-a B) \left (f b^2+2 c^2 d-c (b e+2 a f)\right )+c \left (A f b^2-(B c d+A c e+a B f) b+2 c (A c d+a B e-a A f)\right ) x}{\left (b^2-4 a c\right ) \left ((c d-a f)^2-(b d-a e) (c e-b f)\right ) \left (c x^2+b x+a\right )}-\frac{\left ((B d-A e) f^2 b^5-2 f \left (-a A f^2+B c d e-A c \left (e^2-d f\right )\right ) b^4-\left (A c e \left (c e^2-4 a f^2-2 c d f\right )+B \left (a^2 f^3+4 a c d f^2-c^2 d \left (e^2+5 d f\right )\right )\right ) b^3-4 \left (B d^2 e c^3+A f \left (2 c^2 d^2+3 a^2 f^2+3 a c \left (e^2-d f\right )\right ) c\right ) b^2+2 c \left (B \left (c^3 d^3+a c^2 \left (e^2-7 d f\right ) d+3 a^3 f^3+3 a^2 c f \left (e^2+d f\right )\right )+A c e \left (3 c^2 d^2+3 a^2 f^2+a c \left (3 e^2+2 d f\right )\right )\right ) b-4 c^2 \left (A \left (c^3 d^3+a c^2 \left (3 e^2-5 d f\right ) d-3 a^3 f^3-a^2 c f \left (e^2-7 d f\right )\right )-a B e \left (c^2 d^2-3 a^2 f^2-a c \left (e^2-2 d f\right )\right )\right )\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2} \left (c^2 d^2-b c e d+f \left (f a^2-b e a+b^2 d\right )+a c \left (e^2-2 d f\right )\right )^2}+\frac{\left (B \left (d e \left (e^2-3 d f\right ) c^2-2 d f \left (b e^2-a f e-2 b d f\right ) c+f^2 \left (e f a^2-4 b d f a+b^2 d e\right )\right )-A \left (\left (e^4-4 d f e^2+2 d^2 f^2\right ) c^2+2 f \left (a f \left (e^2-2 d f\right )-b \left (e^3-3 d e f\right )\right ) c-f^2 \left (-\left (e^2-2 d f\right ) b^2+2 a e f b-2 a^2 f^2\right )\right )\right ) \tanh ^{-1}\left (\frac{e+2 f x}{\sqrt{e^2-4 d f}}\right )}{\sqrt{e^2-4 d f} \left (c^2 d^2-b c e d+f \left (f a^2-b e a+b^2 d\right )+a c \left (e^2-2 d f\right )\right )^2}+\frac{\left (A (c e-b f) \left (f (b e-2 a f)-c \left (e^2-2 d f\right )\right )-B \left (-d \left (e^2-d f\right ) c^2+2 d f (b e-a f) c-f^2 \left (b^2 d-a^2 f\right )\right )\right ) \log \left (c x^2+b x+a\right )}{2 \left (c^2 d^2-b c e d+f \left (f a^2-b e a+b^2 d\right )+a c \left (e^2-2 d f\right )\right )^2}-\frac{\left (A (c e-b f) \left (f (b e-2 a f)-c \left (e^2-2 d f\right )\right )-B \left (-d \left (e^2-d f\right ) c^2+2 d f (b e-a f) c-f^2 \left (b^2 d-a^2 f\right )\right )\right ) \log \left (f x^2+e x+d\right )}{2 \left (c^2 d^2-b c e d+f \left (f a^2-b e a+b^2 d\right )+a c \left (e^2-2 d f\right )\right )^2} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)/((a + b*x + c*x^2)^2*(d + e*x + f*x^2)),x]

[Out]

-((A*c*(2*a*c*e - b*(c*d + a*f)) + (A*b - a*B)*(2*c^2*d + b^2*f - c*(b*e + 2*a*f
)) + c*(A*b^2*f + 2*c*(A*c*d + a*B*e - a*A*f) - b*(B*c*d + A*c*e + a*B*f))*x)/((
b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(a + b*x + c*x^2))) - ((b
^5*(B*d - A*e)*f^2 - 2*b^4*f*(B*c*d*e - a*A*f^2 - A*c*(e^2 - d*f)) - 4*c^2*(A*(c
^3*d^3 - 3*a^3*f^3 - a^2*c*f*(e^2 - 7*d*f) + a*c^2*d*(3*e^2 - 5*d*f)) - a*B*e*(c
^2*d^2 - 3*a^2*f^2 - a*c*(e^2 - 2*d*f))) - 4*b^2*(B*c^3*d^2*e + A*c*f*(2*c^2*d^2
 + 3*a^2*f^2 + 3*a*c*(e^2 - d*f))) + 2*b*c*(B*(c^3*d^3 + 3*a^3*f^3 + a*c^2*d*(e^
2 - 7*d*f) + 3*a^2*c*f*(e^2 + d*f)) + A*c*e*(3*c^2*d^2 + 3*a^2*f^2 + a*c*(3*e^2
+ 2*d*f))) - b^3*(A*c*e*(c*e^2 - 2*c*d*f - 4*a*f^2) + B*(4*a*c*d*f^2 + a^2*f^3 -
 c^2*d*(e^2 + 5*d*f))))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/((b^2 - 4*a*c)^(
3/2)*(c^2*d^2 - b*c*d*e + f*(b^2*d - a*b*e + a^2*f) + a*c*(e^2 - 2*d*f))^2) + ((
B*(c^2*d*e*(e^2 - 3*d*f) - 2*c*d*f*(b*e^2 - 2*b*d*f - a*e*f) + f^2*(b^2*d*e - 4*
a*b*d*f + a^2*e*f)) - A*(c^2*(e^4 - 4*d*e^2*f + 2*d^2*f^2) - f^2*(2*a*b*e*f - 2*
a^2*f^2 - b^2*(e^2 - 2*d*f)) + 2*c*f*(a*f*(e^2 - 2*d*f) - b*(e^3 - 3*d*e*f))))*A
rcTanh[(e + 2*f*x)/Sqrt[e^2 - 4*d*f]])/(Sqrt[e^2 - 4*d*f]*(c^2*d^2 - b*c*d*e + f
*(b^2*d - a*b*e + a^2*f) + a*c*(e^2 - 2*d*f))^2) + ((A*(c*e - b*f)*(f*(b*e - 2*a
*f) - c*(e^2 - 2*d*f)) - B*(2*c*d*f*(b*e - a*f) - f^2*(b^2*d - a^2*f) - c^2*d*(e
^2 - d*f)))*Log[a + b*x + c*x^2])/(2*(c^2*d^2 - b*c*d*e + f*(b^2*d - a*b*e + a^2
*f) + a*c*(e^2 - 2*d*f))^2) - ((A*(c*e - b*f)*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)
) - B*(2*c*d*f*(b*e - a*f) - f^2*(b^2*d - a^2*f) - c^2*d*(e^2 - d*f)))*Log[d + e
*x + f*x^2])/(2*(c^2*d^2 - b*c*d*e + f*(b^2*d - a*b*e + a^2*f) + a*c*(e^2 - 2*d*
f))^2)

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)/(c*x**2+b*x+a)**2/(f*x**2+e*x+d),x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 8.88929, size = 1376, normalized size = 1.28 \[ \frac{-A f b^3+A c e b^2+a B f b^2-A c f x b^2-A c^2 d b-a B c e b+3 a A c f b+B c^2 d x b+A c^2 e x b+a B c f x b+2 a B c^2 d-2 a A c^2 e-2 a^2 B c f-2 A c^3 d x-2 a B c^2 e x+2 a A c^2 f x}{\left (b^2-4 a c\right ) \left (d f b^2-c d e b-a e f b+c^2 d^2+a c e^2+a^2 f^2-2 a c d f\right ) \left (c x^2+b x+a\right )}+\frac{\left (B d f^2 b^5-A e f^2 b^5+2 a A f^3 b^4-2 A c d f^2 b^4+2 A c e^2 f b^4-2 B c d e f b^4-A c^2 e^3 b^3-a^2 B f^3 b^3+B c^2 d e^2 b^3-4 a B c d f^2 b^3+4 a A c e f^2 b^3+5 B c^2 d^2 f b^3+2 A c^2 d e f b^3-12 a^2 A c f^3 b^2+12 a A c^2 d f^2 b^2-4 B c^3 d^2 e b^2-8 A c^3 d^2 f b^2-12 a A c^2 e^2 f b^2+2 B c^4 d^3 b+6 a A c^3 e^3 b+6 a^3 B c f^3 b+2 a B c^3 d e^2 b+6 a^2 B c^2 d f^2 b+6 a^2 A c^2 e f^2 b+6 A c^4 d^2 e b-14 a B c^3 d^2 f b+6 a^2 B c^2 e^2 f b+4 a A c^3 d e f b-4 A c^5 d^3-4 a^2 B c^3 e^3+12 a^3 A c^2 f^3-12 a A c^4 d e^2-28 a^2 A c^3 d f^2-12 a^3 B c^2 e f^2+4 a B c^4 d^2 e+20 a A c^4 d^2 f+4 a^2 A c^3 e^2 f+8 a^2 B c^3 d e f\right ) \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\left (b^2-4 a c\right ) \sqrt{4 a c-b^2} \left (d f b^2-c d e b-a e f b+c^2 d^2+a c e^2+a^2 f^2-2 a c d f\right )^2}+\frac{\left (A c^2 e^4-B c^2 d e^3-2 A b c f e^3+A b^2 f^2 e^2+2 a A c f^2 e^2-4 A c^2 d f e^2+2 b B c d f e^2-2 a A b f^3 e-a^2 B f^3 e-b^2 B d f^2 e+6 A b c d f^2 e-2 a B c d f^2 e+3 B c^2 d^2 f e+2 a^2 A f^4-2 A b^2 d f^3+4 a b B d f^3-4 a A c d f^3+2 A c^2 d^2 f^2-4 b B c d^2 f^2\right ) \tan ^{-1}\left (\frac{e+2 f x}{\sqrt{4 d f-e^2}}\right )}{\sqrt{4 d f-e^2} \left (d f b^2-c d e b-a e f b+c^2 d^2+a c e^2+a^2 f^2-2 a c d f\right )^2}+\frac{\left (-A c^2 e^3+B c^2 d e^2+2 A b c f e^2-A b^2 f^2 e-2 a A c f^2 e+2 A c^2 d f e-2 b B c d f e+2 a A b f^3-a^2 B f^3+b^2 B d f^2-2 A b c d f^2+2 a B c d f^2-B c^2 d^2 f\right ) \log \left (c x^2+b x+a\right )}{2 \left (d f b^2-c d e b-a e f b+c^2 d^2+a c e^2+a^2 f^2-2 a c d f\right )^2}+\frac{\left (A c^2 e^3-B c^2 d e^2-2 A b c f e^2+A b^2 f^2 e+2 a A c f^2 e-2 A c^2 d f e+2 b B c d f e-2 a A b f^3+a^2 B f^3-b^2 B d f^2+2 A b c d f^2-2 a B c d f^2+B c^2 d^2 f\right ) \log \left (f x^2+e x+d\right )}{2 \left (d f b^2-c d e b-a e f b+c^2 d^2+a c e^2+a^2 f^2-2 a c d f\right )^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)/((a + b*x + c*x^2)^2*(d + e*x + f*x^2)),x]

[Out]

(-(A*b*c^2*d) + 2*a*B*c^2*d + A*b^2*c*e - a*b*B*c*e - 2*a*A*c^2*e - A*b^3*f + a*
b^2*B*f + 3*a*A*b*c*f - 2*a^2*B*c*f + b*B*c^2*d*x - 2*A*c^3*d*x + A*b*c^2*e*x -
2*a*B*c^2*e*x - A*b^2*c*f*x + a*b*B*c*f*x + 2*a*A*c^2*f*x)/((b^2 - 4*a*c)*(c^2*d
^2 - b*c*d*e + a*c*e^2 + b^2*d*f - 2*a*c*d*f - a*b*e*f + a^2*f^2)*(a + b*x + c*x
^2)) + ((2*b*B*c^4*d^3 - 4*A*c^5*d^3 - 4*b^2*B*c^3*d^2*e + 6*A*b*c^4*d^2*e + 4*a
*B*c^4*d^2*e + b^3*B*c^2*d*e^2 + 2*a*b*B*c^3*d*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2*A*f^4)*ArcTan
[(e + 2*f*x)/Sqrt[-e^2 + 4*d*f]])/(Sqrt[-e^2 + 4*d*f]*(c^2*d^2 - b*c*d*e + a*c*e
^2 + b^2*d*f - 2*a*c*d*f - a*b*e*f + a^2*f^2)^2) + ((B*c^2*d*e^2 - A*c^2*e^3 - B
*c^2*d^2*f - 2*b*B*c*d*e*f + 2*A*c^2*d*e*f + 2*A*b*c*e^2*f + b^2*B*d*f^2 - 2*A*b
*c*d*f^2 + 2*a*B*c*d*f^2 - A*b^2*e*f^2 - 2*a*A*c*e*f^2 + 2*a*A*b*f^3 - a^2*B*f^3
)*Log[a + b*x + c*x^2])/(2*(c^2*d^2 - b*c*d*e + a*c*e^2 + b^2*d*f - 2*a*c*d*f -
a*b*e*f + a^2*f^2)^2) + ((-(B*c^2*d*e^2) + A*c^2*e^3 + B*c^2*d^2*f + 2*b*B*c*d*e
*f - 2*A*c^2*d*e*f - 2*A*b*c*e^2*f - b^2*B*d*f^2 + 2*A*b*c*d*f^2 - 2*a*B*c*d*f^2
 + A*b^2*e*f^2 + 2*a*A*c*e*f^2 - 2*a*A*b*f^3 + a^2*B*f^3)*Log[d + e*x + f*x^2])/
(2*(c^2*d^2 - b*c*d*e + a*c*e^2 + b^2*d*f - 2*a*c*d*f - a*b*e*f + a^2*f^2)^2)

_______________________________________________________________________________________

Maple [B]  time = 0.054, size = 54204, normalized size = 50.4 \[ \text{output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)/(c*x^2+b*x+a)^2/(f*x^2+e*x+d),x)

[Out]

result too large to display

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((c*x^2 + b*x + a)^2*(f*x^2 + e*x + d)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((c*x^2 + b*x + a)^2*(f*x^2 + e*x + d)),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)/(c*x**2+b*x+a)**2/(f*x**2+e*x+d),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.38843, size = 1, normalized size = 0. \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((c*x^2 + b*x + a)^2*(f*x^2 + e*x + d)),x, algorithm="giac")

[Out]

Done